package com.llh.bean;

import java.io.Serializable;
import java.util.Date;

public class OpenDay implements Serializable {
    private String exchange;

    private Date cal_date;

    private String is_open;

    private Date pretrade_date;

    private static final long serialVersionUID = 1L;

    public String getExchange() {
        return exchange;
    }

    public void setExchange(String exchange) {
        this.exchange = exchange == null ? null : exchange.trim();
    }

    public Date getCal_date() {
        return cal_date;
    }

    public void setCal_date(Date cal_date) {
        this.cal_date = cal_date;
    }

    public String getIs_open() {
        return is_open;
    }

    public void setIs_open(String is_open) {
        this.is_open = is_open == null ? null : is_open.trim();
    }

    public Date getPretrade_date() {
        return pretrade_date;
    }

    public void setPretrade_date(Date pretrade_date) {
        this.pretrade_date = pretrade_date;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        OpenDay other = (OpenDay) that;
        return (this.getExchange() == null ? other.getExchange() == null : this.getExchange().equals(other.getExchange()))
            && (this.getCal_date() == null ? other.getCal_date() == null : this.getCal_date().equals(other.getCal_date()))
            && (this.getIs_open() == null ? other.getIs_open() == null : this.getIs_open().equals(other.getIs_open()))
            && (this.getPretrade_date() == null ? other.getPretrade_date() == null : this.getPretrade_date().equals(other.getPretrade_date()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getExchange() == null) ? 0 : getExchange().hashCode());
        result = prime * result + ((getCal_date() == null) ? 0 : getCal_date().hashCode());
        result = prime * result + ((getIs_open() == null) ? 0 : getIs_open().hashCode());
        result = prime * result + ((getPretrade_date() == null) ? 0 : getPretrade_date().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", exchange=").append(exchange);
        sb.append(", cal_date=").append(cal_date);
        sb.append(", is_open=").append(is_open);
        sb.append(", pretrade_date=").append(pretrade_date);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}